// ++++++++++++++++++++++++++++++++++++++++
// 《零基础Go语言算法实战》源码
// ++++++++++++++++++++++++++++++++++++++++
// Author:廖显东（ShirDon）
// Blog:https://www.shirdon.com/
// Gitee:https://gitee.com/shirdonl/goAlgorithms.git
// Buy link :https://item.jd.com/14101229.html
// ++++++++++++++++++++++++++++++++++++++++

package main

import "fmt"

func main() {
	num1 := 8
	num2 := 18
	num3 := 8
	var res bool
	res = (num1 > num2) && (num1 == num3)
	fmt.Printf("&&（逻辑与）结果： %t \n", res)
	res = (num1 > num2) || (num1 == num3)
	fmt.Printf("||（逻辑或）结果： %t \n", res)
	res = !(num1 == num3)
	fmt.Printf("!（逻辑非）结果： %t \n", res)
}

//$ go run bool2.go
//&&（逻辑与）结果： false
//||（逻辑或）结果： true
//!（逻辑非）结果： false
